:host {
  width: 100%;
  display: block;
  font-family: var(--calendar-font-family, quark-sFontFamily);
  -webkit-tap-highlight-color: transparent;
}

:host .quark-calendar {
  display: flex;
  flex-direction: column;
  height: var(--calendar-height, 80vh);
  background: var(--calendar-background-color, quark-fillBaseColor);
}

:host([position="left"]) .quark-calendar {
  height: var(--calendar-height, 100%);
}

:host([position="right"]) .quark-calendar {
  height: var(--calendar-height, 100%);
}

:host([tiled]) .quark-calendar {
  height: var(--calendar-height, auto);
}

:host .quark-calendar-header {
  flex-shrink: 0;
  z-index: 2;
  position: relative;
  box-shadow: 0 2px 10px rgba(125, 126, 128, 0.16);
}

:host .quark-calendar-month-title {
  color: var(--calendar-month-title-color, quark-textBaseColor); 
  height: var(--calendar-month-title-row-height, 44px);
  line-height: var(--calendar-month-title-row-height, 44px);
  font-weight: var(--calendar-month-title-font-weight, 500);
  font-size: var(--calendar-month-title-font-size, 14px);
  text-align: center;
}

:host .quark-calendar-header-title {
  color: var(--calendar-title-color, quark-textBaseColor); 
  height: var(--calendar-title-row-height, 44px);
  line-height: var(--calendar-title-row-height, 44px);
  font-weight: var(--calendar-title-font-weight, 500);
  font-size:  var(--calendar-title-font-size, 16px);
  text-align: center;
}

:host .quark-calendar-header-subtitle {
  color: var(--calendar-subtitle-color, quark-textBaseColor); 
  height: var(--calendar-subtitle-row-height, 44px);
  line-height: var(--calendar-subtitle-row-height, 44px);
  font-weight: var(--calendar-subtitle-font-weight, 500);
  font-size: var(--calendar-subtitle-font-size, 14px);
  text-align: center;
}

:host .quark-calendar-weekdays {
  display: flex;
}

:host .quark-calendar-weekday {
  flex: 1;
  font-size: var(--calendar-weekday-font-size, 12px);
  line-height: 30px;
  text-align: center;
}

:host .quark-calendar-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

:host .quark-calendar-body::-webkit-scrollbar {
  display: none;
}

:host .quark-calendar-days {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  user-select: none;
}

:host .quark-calendar-month-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  color: rgba(242, 243, 245, 0.8);;
  font-size: 160px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

:host .quark-calendar-day,
:host .quark-calendar-selected-day {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

:host .quark-calendar-day {
  position: relative;
  width: 14.285%;
  height: var(--calendar-day-row-height, 64px);
  font-size: var(--calendar-day-font-size, 16px);
  margin-bottom: 4px;
  cursor: pointer;
}

:host .quark-calendar-day-end,
:host .quark-calendar-day-start,
:host .quark-calendar-day-start-end,
:host .quark-calendar-day-multiple-middle,
:host .quark-calendar-day-multiple-selected {
  color: var(--calendar-day-selected-color, quark-textWhiteColor);
  background: var(--calendar-theme-color, quark-primaryColor);
}

:host .quark-calendar-day-start {
  border-radius: var(--calendar-day-border-radius, quark-radiusMd) 0 0 var(--calendar-day-border-radius, quark-radiusMd);
}

:host .quark-calendar-day-end {
  border-radius: 0 var(--calendar-day-border-radius, quark-radiusMd) var(--calendar-day-border-radius, quark-radiusMd) 0;
}

:host .quark-calendar-day-start-end,
:host .quark-calendar-day-multiple-selected {
  border-radius: var(--calendar-day-border-radius, quark-radiusMd);
}

:host .quark-calendar-day-middle {
  color: var(--calendar-theme-color, quark-primaryColor);
}

:host .quark-calendar-day-middle::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: currentColor;
  opacity: 0.1;
  content: '';
}

:host .quark-calendar-day-disabled {
  color: var(--calendar-day-disabled-color, quark-textDisabledColor);
  cursor: default;
}

:host .quark-calendar-top-info,
:host .quark-calendar-bottom-info {
  position: absolute;
  right: 0;
  left: 0;
  font-size: 10px;
  line-height: 14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  @media (max-width: 350px) {
    font-size: 9px;
  }
}

:host .quark-calendar-top-info {
  top: 6px;
}

:host .quark-calendar-bottom-info {
  bottom: 6px;
}

:host .quark-calendar-selected-day {
  width: 54px;
  height: 54px;
  color: var(--calendar-day-selected-color, quark-textWhiteColor);
  background: var(--calendar-theme-color, quark-primaryColor);
  border-radius: var(--calendar-day-border-radius, quark-radiusMd);
}

:host .quark-calendar-footer {
  flex-shrink: 0;
  margin: 8px 0;
  padding-left: var(--calendar-footer-padding, 16px);
  padding-right: var(--calendar-footer-padding, 16px);
}

:host .quark-calendar-button {
  --quark-theme-color: var(--calendar-theme-color, quark-primaryColor);
}

:host .quark-calendar-pop-up  {
  --popup-max-width: 100%;
}